using System;
using System.Collections.Generic;

namespace Nop.Core.Domain.XJ
{
	/// <summary>
	/// 巡检计划
	/// </summary>
	public class XJInspectionPlan : BaseEntity
	{
		private ICollection<XJEquipmentCategory> _categorys;
		private ICollection<XJPlace> _places;
		/// <summary>
		/// 计划编号
		/// </summary>
		public string PNo { get; set; }
		/// <summary>
		/// 计划名称
		/// 有名称，巡检内容里显示名称；没有名称，巡检内容显示具体的巡检点、设备分类
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 类型：日巡检、周巡检、月巡检
		/// <see cref="InspectionTypeEnum"/>
		/// </summary>
		public int TypeId { get; set; }
		/// <summary>
		/// 巡检目标
		/// <see cref="AimTypeEnum"/>
		/// </summary>
		public int AimId { get; set; }
		/// <summary>
		/// 巡检班组Id
		/// </summary>
		public int TeamId { get; set; }
		/// <summary>
		/// 巡检人员Id
		/// </summary>
		public int PersonId { get; set; }
		/// <summary>
		/// 维修班组Id
		/// </summary>
		public int MaintenanceTeamId { get; set; }
		/// <summary>
		/// 维修人员Id
		/// </summary>
		public int MaintenancePersonId { get; set; }
		/// <summary>
		/// 计划开始日期
		/// </summary>
		public DateTime StartOn { get; set; }
		/// <summary>
		/// 计划结束日期
		/// </summary>
		public DateTime EndOn { get; set; }
		/// <summary>
		/// 漏检天数
		/// </summary>
		public int LossTime { get; set; }
		/// <summary>
		/// 发布
		/// </summary>
		public bool Published { get; set; }
		/// <summary>
		/// 创建人
		/// </summary>
		public int CustomerId { get; set; }
		/// <summary>
		/// 最后巡检日期
		/// </summary>
		public DateTime? LastUpdateOn { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreatedOn { get; set; }
		/// <summary>
		/// 标记删除
		/// </summary>
		public bool Deleted { get; set; }
		/// <summary>
		/// 设备分类
		/// </summary>
		public virtual ICollection<XJEquipmentCategory> Categorys
		{
			get { return _categorys ?? (_categorys = new List<XJEquipmentCategory>()); }
			protected set { _categorys = value; }
		}
		/// <summary>
		/// 巡检点
		/// </summary>
		public virtual ICollection<XJPlace> Places
		{
			get { return _places ?? (_places = new List<XJPlace>()); }
			protected set { _places = value; }
		}
	}
}
